<template>
<div class="cc">
    <label>金额</label>
    <input type="number" v-model="money" />

    <p>格式化金额:{{ FMoney }}</p>
</div>
</template>

<script setup>
import {ref, computed} from 'vue'

const money = ref(0)
const FMoney = computed(() => {
    return '￥' + money.value.toFixed(2)
})

</script>

<style scoped>
.cc{
    background-color: rgb(229, 248, 247);
    padding:20px;
    border-radius:10px;
}
</style>